<?php
namespace Base\Controller;
use Todo\Controller\CurdController;

class DepartmentController extends CurdController {

    /**
     * 获取要编辑的数据，建议重写
     * @param $id
     * @return mixed
     */
    protected function _editData($id){
        $this->_loadModel();
        $data = $this->_model->keyFind($id);
        if($data['master_user']){
            $data['number'] = D('Todo/Sys/User')->keyFind($data['master_user'], 'account');
        }
        return $data;
    }
}